GetNumSyncErrors

Definition:

GetNumSyncErrors()

 

Description:

Retrieve the number of error messages available resulting from failures when synchronising data using the Synchronise Scripting Method.

 

Platforms:

All

 

Parameters:

none

 

Returns:

int

Number of error messages available.

 

Notes:

  • This Method is used in conjunction with the GetSyncErrorDataSource, GetSyncErrorRecordIndex and GetSyncErrorDescription Methods to retrieve error messages should a call to the Synchronise Method be unsuccessful in part or whole. These Methods can be used to retrieve any error messages resulting from the last call to Synchronise for both synchronous and asynchronous transfers.

    GetNumSyncErrors can be used, after a call to Synchronise, to check whether there were any failures during the data transfers. If this Method returns a value greater than zero this would indicate that there were failures during the sync and informs you of the number of errors. You can then use the other Methods to retrieve the error messages and find out the location of failed records in the local database on the device.

    See the description for GetSyncErrorRecordIndex for an example of how to use these Methods.

  • If there could potentially be a large number of errors, e.g. if you will be transferring large amounts of data between a remote data source and the mobile device, you might want to consider creating a Custom Table which you can use to store any sync errors, for example so that you can then display them in a ListView from the Custom Table.


See also:

GetSyncErrorDataSource

GetSyncErrorDescription

GetSyncErrorRecordIndex

Synchronise